<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>黑名单管理</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description"
	content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
<meta name="author" content="Muhammad Usman">

<!-- The styles -->
<link
	href="<%=request.getContextPath()%>/resources/css/bootstrap-cerulean.min.css"
	rel="stylesheet">
<link
	href="<%=request.getContextPath()%>/resources/css/charisma-app.css"
	rel="stylesheet">
<link
	href='<%=request.getContextPath()%>/resources/bower_components/fullcalendar/dist/fullcalendar.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/bower_components/fullcalendar/dist/fullcalendar.print.css'
	rel='stylesheet' media='print'>
<link
	href='<%=request.getContextPath()%>/resources/bower_components/chosen/chosen.min.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/bower_components/colorbox/example3/colorbox.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/bower_components/responsive-tables/responsive-tables.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/bower_components/bootstrap-tour/build/css/bootstrap-tour.min.css'
	rel='stylesheet'>
<link href='<%=request.getContextPath()%>/resources/css/jquery.noty.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/css/noty_theme_default.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/css/elfinder.min.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/css/elfinder.theme.css'
	rel='stylesheet'>
<link
	href='<%=request.getContextPath()%>/resources/css/jquery.iphone.toggle.css'
	rel='stylesheet'>
<link href='<%=request.getContextPath()%>/resources/css/uploadify.css'
	rel='stylesheet'>
<link href='<%=request.getContextPath()%>/resources/css/animate.min.css'
	rel='stylesheet'>

<!-- jQuery -->
<script
	src="<%=request.getContextPath()%>/resources/bower_components/jquery/jquery.min.js"></script>

<!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

<!-- The fav icon -->
<link rel="shortcut icon"
	href="<%=request.getContextPath()%>/resources/img/favicon.ico">
<link
	href='<%=request.getContextPath()%>/resources/css/datetimepicker.css'
	rel='stylesheet'>
<script
	src="<%=request.getContextPath()%>/resources/js/jquery.datetimepicker.js"></script>
<script type="text/javascript">
	function blackStudent(id) {
			$("#blackStudent").find("input[name='id']").val(id);
			$("#blackStudent").submit();
	}
	function whiteStudent(id) {
		$("#whiteStudent").find("input[name='id']").val(id);
		$("#whiteStudent").submit();
}
</script>
</head>

<body>
	<jsp:include page="../toolbar.jsp"></jsp:include>
	<div class="ch-container">
		<div class="row">
			<jsp:include page="../snav.jsp"></jsp:include>
			<div id="content" class="col-lg-10 col-sm-10">
				<div class="container-fluid">
					<div class="row-fluid">
						<div class="span12">
							<table class="table">
								<thead>
									<tr>
										<th>身份证号</th>
										<th>姓名</th>
										<th>性别</th>
										<th>考生状态</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<c:forEach items="${users }" var="u">
										<tr>
											<td>${u.username }</td>
											<td>${u.studentMes.name }</td>
											<td>${u.studentMes.sex }</td>
											<td><c:if test="${u.status==0 }">未拉黑</c:if> <c:if
													test="${u.status==1 }">已拉黑</c:if></td>
											<td><c:if test="${u.status==0 }">
													<a href="javascript:blackStudent('${u.id }')">拉黑</a>
												</c:if> <c:if test="${u.status==1 }">
													<a href="javascript:whiteStudent('${u.id }')">清除</a>
												</c:if></td>
										</tr>
									</c:forEach>
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<jsp:include page="../foot.jsp"></jsp:include>
	<form action="<%=request.getContextPath() %>/student/blackStudent" id="blackStudent"
		method="post">
		<input type="hidden" name="id" />
	</form>
	<form action="<%=request.getContextPath() %>/student/whiteStudent" id="whiteStudent"
		method="post">
		<input type="hidden" name="id" />
	</form>
</body>
</html>
